Abstract Factory
The Abstract Factory design pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Usage High
UML class diagram
A visualization of the classes and objects participating in this pattern.
Sample code
This structural code demonstrates the Abstract Factory pattern creating parallel hierarchies of objects. Object creation has been abstracted and there is no need for hard-coded class names in the client code.
Output
See also